#include <stdio.h>
#include <math.h>

int main(void) {
	int N;
	int a[10000][2];
	int min = 0, L = 0;
	int x1;
	int x2;
	while (1) {
		min = 1e6;
		scanf("%d", &N);
		if (N != 0) {
			for (int i = 0; i < N; i++) {
				scanf("%d%d", &a[i][0], &a[i][1]);
			}
			for (int i = 0; i < N - 1; i++) {
				for (int j = i + 1; j < N; j++) {
					L = (pow((a[i][0] - a[j][0]), 2) + pow((a[i][1] - a[j][1]), 2));
					if (min > L) {
						x1 = i, x2 = j;
						min = L;
					}
				}
			}
			printf("(%d,%d) (%d,%d)\n", a[x1][0], a[x1][1], a[x2][0], a[x2][1]);
		} else
			break;
	}
}
